package com.yuqiao.read.design.decorator;

/**
 * 摩卡
 */
public class Mocha extends CondimentDecorator {

    Beverage beverage;

    public Mocha(Beverage beverage){
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription()+"Mocha";
    }

    /**
     * 调料的价钱加上咖啡的价钱
     * @return
     */
    @Override
    public double cost() {
        return .20+beverage.cost();
    }
}
